#!/usr/bin/env python
from wwpy.util.Error import ImplementError

class IO(object):
    
    def __init__(self,handle=None,**kwargs):
        self.handle=handle
        self.kwargs=kwargs
    
    def read(self,*args,**kwargs):
        raise ImplementError
    
    def write(self,*args,**kwargs):
        raise ImplementError
    
    def close(self):
        if hasattr(self.handle,'close') and callable(self.handle.close):
            self.handle.close()
    
